package tech.wetech.admin3.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import tech.wetech.admin3.sys.service.OssService;

@RestController
@RequestMapping("/oss")
public class OssUploadController {
  @Autowired
  private OssService ossService;

  @PostMapping("/upload_file")
  public String uploadFileToOSS(@RequestParam("file") MultipartFile file) {
    return ossService.uploadImage(file);
  }
}
